How to report on content that is embedded in triggering email?

I’m using Icinga2 and we send emails to pagerduty to trigger incidents. Within the email is often a specific string that indicates a more detailed issue than the one reflected in the subject line.

How to create a report of all incident records that were created in which the email body contained the words “socket timeout”?

Additionally, it would be useful to get a list of dates and counts for the number of records that occurred on the days when a socket timeout happened.

Thanks in advance,
Chris.

:wave: Hi here Chris,

To create a report of all incident records in PagerDuty where the email body contained the words “socket timeout,” you can try the following steps:

  1. Search for Incidents with Specific Keyword: In PagerDuty’s incident search interface, look for a filter or search option that allows you to search incidents based on the content of the email body. You may need to use PagerDuty’s API or integrations to achieve this level of search. For example, if you’re using the PagerDuty API, you can use the GET /incidents endpoint with appropriate query parameters.

GET /incidents?description_contains=socket%20timeout

  1. Export Incident Data: Once you’ve identified the incidents that contain the keyword “socket timeout,” export the relevant incident data. You can use PagerDuty’s API to retrieve incident details, including creation dates.

  2. Data Analysis: Analyze the exported data to obtain a list of dates and counts for incidents with “socket timeout” in the email body. Group the incidents by date and count the occurrences for each day. This will output a dictionary with dates as keys and incident counts as values.

NOTE: These steps are a general guideline and might require adjustments based on your specific setup. Please reach out to our Support team if you need further help.

Was this helpful?

  • YES :+1:
  • NO :-1:

0 voters